package com.sheep.jucdemo.part11.part11_7;

/**
 * @Date 2022/5/31 20:33
 * @Created by sheep
 */
public class Test11_7_1_2 {
    public static void main(String[] args) {
        // 订单模块
        Thread threadOne = new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("保存订单的线程");
                try {
                    Thread.sleep(500);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                throw new NullPointerException();
            }
        }, "订单模块");
        // 发货模块
        Thread threadTwo = new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("保存收货地址的线程");
            }
        }, "发货模块");
        // 启动线程
        threadOne.start();
        threadTwo.start();
    }
}
